New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@envelop/instrumentation

Package Overview
Dependencies
Maintainers
0
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@envelop/instrumentation

This package contains utility functions and types to ease the use of instrumentation accross Envelop, Yoga, whatwg-node and Hive Gateway plugins.

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
72K
Maintainers
0
Weekly downloads
 
Created
Source

@envelop/instrumentation

This package contains utility functions and types to ease the use of instrumentation accross Envelop, Yoga, whatwg-node and Hive Gateway plugins.

[!NOTE] Instrumentation are automatically composed together. This should only be used if the default ordering doesn't suit your needs (ie. instrumentation and hooks should be executed in different order)

composeInstrumentation(instrumentation: Instrumentation[]): Instrumentation

This function composes all the instrumentation into one. The instrumentation will be called in the same order as they are in the array (from top to bottom).

import { composeInstrumentation } from '@envelop/instrumentation'

// Extract instrumentation to compose from their plugins
const { instrumentation: instrumentation1, ...plugin1 } = usePlugin1()
const { instrumentation: instrumentation2, ...plugin2 } = usePlugin2()

const getEnveloped = envelop({
  plugins: [
    plugin1,
    plugin2,
    // Plugin instrumentation and plugin hooks will be executed in a different order
    { instrumentation: composeInstrumentation([instrumentation1, instrumentation2]) }
  ]
})

FAQs

Package last updated on 06 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc